package com.scs.application.modules.print.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 打印数据
 */
@Data
@Accessors(chain = true)
@TableName("print_field")
@EntityIndexAnnotation(ix = {"template_id", "type"})
public class Field extends DataEntity {

    @EntityFieldAnnotation(
            text = "打印模板Id",
            type = EntityFieldType.LONG,
            length = "0.0",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String templateId;

    @EntityFieldAnnotation(
            text = "列类型  1:barcode  2:head 3:items 4:foot",
            length = "20.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String type;

    @EntityFieldAnnotation(
            text = "列名称",
            length = "50.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String field;

    @EntityFieldAnnotation(
            text = "显示名称",
            length = "50.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String label;

    @EntityFieldAnnotation(
            text = "显示顺序",
            length = "0.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Integer sort;

    @EntityFieldAnnotation(
            text = "显示宽度",
            length = "0.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Integer width;

    @EntityFieldAnnotation(
            text = "显示合计",
            length = "0.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Boolean summary;

    @EntityFieldAnnotation(
            text = "字体大小",
            length = "0.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Integer fontSize;

    @EntityFieldAnnotation(
            text = "格式",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String format;

    @EntityFieldAnnotation(
            text = "是否分组",
            length = "0.0",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagGroup;

    @EntityFieldAnnotation(
            text = "是否分单",
            length = "0.0",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagBreak;

    @EntityFieldAnnotation(
            text = "字典类型",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String dict;

    @EntityFieldAnnotation(
            text = "表达式",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String expression;

    @EntityFieldAnnotation(
            text = "顺序",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "默认左右，也可以设置成上下"
    )
    private String formation;

    @EntityFieldAnnotation(
            text = "是否字体加粗",
            length = "0.0",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagFontBold;

    @EntityFieldAnnotation(
            text = "是否换行",
            length = "0.0",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagLineFeed;

    @EntityFieldAnnotation(
            text = "排序规则",
            length = "20.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String orderRule;

    @EntityFieldAnnotation(
            text = "显示负数",
            length = "0.0",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagShowNegative;

    @EntityFieldAnnotation(
            text = "共享行",
            length = "10.0",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagShareRow;

    @EntityFieldAnnotation(
            text = "共享行数",
            length = "10.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String shareRow;

    @EntityFieldAnnotation(
            text = "对齐方式",
            length = "10.0",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String alignType;

    @EntityFieldAnnotation(
            text = "隐藏表达式",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String hideExpression;

    @EntityFieldAnnotation(
            text = "标题是否隐藏冒号",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagHideColon;
}
